home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / IFC_112 / netscape / application / FoundationAppletStub.java < prev    next >
Encoding:
Text File  |  1999-05-28  |  1.8 KB  |  80 lines  |  [TEXT/CWIE]

  1. // FoundationAppletStub.java
  2. // By Ned Etcode
  3. // Copyright 1996, 1997 Netscape Communications Corp.  All rights reserved.
  4.  
  5. package netscape.application;
  6.  
  7. import netscape.util.*;
  8. import java.net.*;
  9. import java.applet.*;
  10. import java.io.*;
  11.  
  12. class FoundationAppletStub implements AppletStub, AppletContext {
  13.     URL documentBase;
  14.     URL codeBase;
  15.  
  16.     public boolean isActive() {
  17.         return true;
  18.     }
  19.  
  20.     public URL getDocumentBase() {
  21.         if (documentBase == null) {
  22.             try {
  23.                 documentBase = new URL("file:" +
  24. System.getProperty("user.dir").replace(File.separatorChar, '/') + "/");
  25.             } catch (Exception e) {
  26.             }
  27.         }
  28.         return documentBase;
  29.     }
  30.  
  31.     public URL getCodeBase() {
  32.         if (codeBase == null) {
  33.             try {
  34.                 codeBase = new URL("file:" +
  35. System.getProperty("user.dir").replace(File.separatorChar, '/') + "/");
  36.             } catch (Exception e) {
  37.             }
  38.         }
  39.         return codeBase;
  40.     }
  41.  
  42.     public String getParameter(String name) {
  43.         return null;
  44.     }
  45.  
  46.     public AppletContext getAppletContext() {
  47.         return this;
  48.     }
  49.  
  50.     public void appletResize(int width, int height) {
  51.     }
  52.  
  53.     public AudioClip getAudioClip(URL url) {
  54.         return null;
  55.     }
  56.  
  57.     public java.awt.Image getImage(URL url) {
  58.         return AWTCompatibility.awtToolkit().getImage(url);
  59.     }
  60.  
  61.     public Applet getApplet(String name) {
  62.         return null;
  63.     }
  64.  
  65.     public java.util.Enumeration getApplets() {
  66.         java.util.Vector applets = new java.util.Vector();
  67.         applets.addElement(AWTCompatibility.awtApplet());
  68.         return applets.elements();
  69.     }
  70.  
  71.     public void showDocument(URL url) {
  72.     }
  73.  
  74.     public void showDocument(URL url, String target) {
  75.     }
  76.  
  77.     public void showStatus(String status) {
  78.     }
  79. }
  80.